<!--- <!--- Sorting params --->
<cfparam name="orderBy" type="string" default="#client.scholarshipsOrderBy#">
<cfparam name="orderDir" type="string" default="#client.scholarshipsOrderDir#">
<!--- Filter params --->
<cfparam name="filterCohorts" type="string" default="#client.scholarshipsCohorts#">
<cfparam name="filterTypes" type="string" default="#client.scholarshipsTypes#">
<cfparam name="filterAB540" type="string" default="#client.scholarshipsAB540#">
<cfparam name="filterPaymentStatuses" type="string" default="#client.scholarshipsPaymentStatuses#">
<cfparam name="filterAuthorized" type="string" default="#client.scholarshipsAuthorized#">
<cfparam name="filterSearchCriteria" type="string" default="#client.scholarshipsSearchCriteria#">
<!--- Checkboxes --->
<cfparam name="scholarshipIDs" type="string" default="">

<cfset scholarships = application.scholarshipGateway.getAllAsQuery("*", orderBy, orderDir, filterCohorts, filterTypes, filterAB540, filterPaymentStatuses, filterAuthorized, filterSearchCriteria)>
<!--- <cfdump var="#scholarships#"> ---> --->

<cfparam name="organizationID" type="integer" default="0">
<cfparam name="regionID" type="integer" default="0">
<cfparam name="resetFilters" default="false">

<cfset isFiltered = false />

<cfif NOT IsDefined("client.scholarships.organizationIDs") or resetFilters>
	<cfset client.scholarships.organizationIDs = "All">
<cfelseif IsDefined("filterOrganizationIDs")>
	<cfset client.scholarships.organizationIDs = filterOrganizationIDs>
</cfif>
<cfif client.scholarships.organizationIDs neq "All">
	<cfset isFiltered = true />
</cfif>

<cfif NOT IsDefined("client.scholarships.regionIDs") or resetFilters>
	<cfset client.scholarships.regionIDs = "All">
<cfelseif IsDefined("filterRegionIDs")>
	<cfset client.scholarships.regionIDs = filterRegionIDs>
</cfif>
<cfif client.scholarships.regionIDs neq "All">
	<cfset isFiltered = true />
</cfif>

<cfif NOT IsDefined("client.scholarships.cohort") or resetFilters>
	<cfset client.scholarships.cohort = "All">
<cfelseif IsDefined("filterCohort")>
	<cfset client.scholarships.cohort = filterCohort>
</cfif>
<cfif client.scholarships.cohort neq "All">
	<cfset isFiltered = true />
</cfif>

<cfif NOT IsDefined("client.scholarships.type") or resetFilters>
	<cfset client.scholarships.type = "All">
<cfelseif IsDefined("filterType")>
	<cfset client.scholarships.type = filterType>
</cfif>
<cfif client.scholarships.type neq "All">
	<cfset isFiltered = true />
</cfif>

<cfif NOT IsDefined("client.scholarships.claimed") or resetFilters>
	<cfset client.scholarships.claimed = "All">
<cfelseif IsDefined("filterClaimed")>
	<cfset client.scholarships.claimed = filterClaimed>
</cfif>
<cfif client.scholarships.claimed neq "All">
	<cfset isFiltered = true />
</cfif>

<cfinvoke component="#application.scholarshipGateway#" method="getAllAsQuery" returnvariable="scholarships">
	<cfinvokeargument name="organizationID" value="#organizationID#" />
	<cfinvokeargument name="regionID" value="#regionID#" />
	<cfinvokeargument name="organizationIDs" value="#client.scholarships.organizationIDs#" />
	<cfinvokeargument name="regionIDs" value="#client.scholarships.regionIDs#" />
	<cfinvokeargument name="cohort" value="#client.scholarships.cohort#" />
	<cfinvokeargument name="type" value="#client.scholarships.type#" />
	<cfinvokeargument name="claimed" value="#client.scholarships.claimed#" />
</cfinvoke>

<cfset organizations = application.organizationGateway.getAllAsQuery("Organization_ID,Organization", organizationID, regionID, "Organization")>
<cfset regions = application.countyGateway.getRegions()>
<cfset cohorts = application.scholarshipGateway.getCohorts() />
<cfset scholarshipTypes = application.scholarshipGateway.getScholarshipTypes() />

<cfoutput>

	<p>
		<a id="filterLink" href="##" class="btn" onclick="toggle('filter')">Show filters</a><cfif isFiltered> <a href="#script_name#?view=scholarships&resetFilters=true" class="btn">Clear filters</a></cfif>
		<span class="pull-right"><strong>Count:</strong> <span id="recs"></span></span>
	</p>
	
</cfoutput>

	<cfform name="scholarshipsForm" id="scholarshipsForm" action="#script_name#" method="post">
		<cfinput type="hidden" name="view" value="#view#">

		<cfoutput>
			
		<div id="filter" class="alert alert-info alert-block" style="display: none;">
			<h2>Filters</h2>
			<table cellpadding="6">
				<tr valign="top">
					<td>
						<label>Organizations</label>
						<cfselect name="filterOrganizationIDs" size="7" multiple="true" required="yes" message="Organization filter is required" style="width: 350px;">
							<option value="All"<cfif client.scholarships.organizationIDs eq "All"> selected</cfif>>All</option>
							<cfloop query="organizations">
							<option value="#Organization_ID#"<cfif ListFind(client.scholarships.organizationIDs, Organization_ID)> selected</cfif>>#Organization#</option>
							</cfloop>
						</cfselect>
					</td>
					<cfif IsUserInRole("Super User")>
						<td>
							<label>Regions</label>
							<cfselect name="filterRegionIDs" size="7" multiple="true" required="yes" message="Region filter is required" style="width: 150px;">
								<option value="All"<cfif client.scholarships.regionIDs eq "All"> selected</cfif>>All</option>
								<cfloop query="regions">
								<option value="#Region_ID#"<cfif ListFind(client.scholarships.regionIDs, Region_ID)> selected</cfif>>#Region_ID#</option>
								</cfloop>
							</cfselect>
						</td>
					</cfif>
					<td>
						<label>Cohort</label>
						<cfselect name="filterCohort" size="1" multiple="false" required="yes" message="Cohort filter is required" style="width: 150px;">
							<option value="All"<cfif client.scholarships.cohort eq "All"> selected</cfif>>All</option>
							<cfloop query="cohorts">
								<option value="#Cohort#"<cfif client.scholarships.cohort eq Cohort> selected</cfif>>#Cohort#</option>
							</cfloop>
						</cfselect>
					</td>
					<td>
						<label>Scholarship Type</label>
						<cfselect name="filterType" size="1" multiple="false" required="yes" message="Scholarship Type filter is required" style="width: 150px;">
							<option value="All"<cfif client.scholarships.type eq "All"> selected</cfif>>All</option>
							<cfloop query="scholarshipTypes">
								<option value="#Scholarship_Type#"<cfif client.scholarships.type eq Scholarship_Type> selected</cfif>>#Scholarship_Type#</option>
							</cfloop>
						</cfselect>
					</td>
					<td>
						<label>Claimed</label>
						<cfselect name="filterClaimed" size="1" multiple="false" required="yes" message="Claimed filter is required" style="width: 150px;">
							<option value="All"<cfif client.scholarships.claimed eq "All"> selected</cfif>>All</option>
							<option value="Yes"<cfif client.scholarships.claimed eq "Yes"> selected</cfif>>Yes</option>
							<option value="No"<cfif client.scholarships.claimed eq "No"> selected</cfif>>No</option>
						</cfselect>
					</td>
				</tr>
				<tr>
					<td colspan="5">
						<button type="submit" class="btn btn-info">Apply</button> <a href="#script_name#?view=scholarships&resetFilters=true" class="btn btn-info">Clear</a>
					</td>
				</tr>
			</table>
		</div>
		
		</cfoutput>

		<cfif scholarships.RecordCount gt 0>
		
			<cfset recs = 0 />

			<table id="scholarshipsList" width="100%" style="display: none">
				<thead>
					<th>Claim ID</th>
					<th>Organization</th>
					<th>Site</th>
					<cfif IsUserInRole("Super User")>
						<th>Region</th>
					</cfif>
					<th>Cohort</th>
					<th>Scholarship Type</th>
					<th>Claim Date</th>
					<th>Name</th>
					<th>Scheduled Payments</th>
				</thead>

<!--- <td>#Scholarship_ID#</td>
<td><a href="#script_name#?view=editScholarship&rv=#view#&scholarshipID=#Scholarship_ID#">#Claim_ID#</a></td>
<td>#DateFormat(Claim_Date, "m/d/yyyy")#</td>
<td>#DateFormat(Enrollment_Date, "m/d/yyyy")#</td>
<td>#Cohort#</td>
<td>#Scholarship_Type#</td>
<td>#First_Name# #Last_Name#</td>
<td>
	<cfif IsDate(Claim_Date) and Institution1_ID gt 0>
		<cfif institution1Approved eq 0 and institution1Disqualified eq 0>
			<font color="orange">#institution1#</font>
		<cfelseif institution1Approved eq 1 and institution1Disqualified eq 0>
			#institution1#
		<cfelseif institution1Approved eq 0 and institution1Disqualified eq 1>
			<font color="red">#institution1#</font>
		<cfelse>
			Error determining institution status
		</cfif><cfif Len(Trim(institution2)) gt 0 or Len(Trim(institution3)) gt 0>&nbsp;<span class="highlightText">multi-institution</span></cfif>
	</cfif>
</td>
<td>#institution1TermType#</td>
<td>
	<cfif IsNumeric(Scholarship_Type)>
		<cfif Account_Type eq "Check">
			Check
		<cfelse>
			<cfif Len(Trim(Routing_Number)) gt 0 and Len(Trim(Account_Number)) gt 0>
				Entered
			<cfelse>
				Not entered
			</cfif>
		</cfif>
	<cfelse>
		N/A
	</cfif>
</td>
<td>#paymentStatus#</td>
</tr> --->
				<tbody>
					<cfoutput query="scholarships" group="Scholarship_ID">
						<tr>
							<td>
								<!--- <cfif IsUserInRole("Regional Admin")>
									<a href="#script_name#?view=scholarship&rv=#view#&scholarshipID=#Scholarship_ID#">#Scholarship_ID#</a>
								<cfelse>
									<a href="#script_name#?view=editScholarship&rv=#view#&orderID=#Scholarship_ID#&organizationID=#Organization_ID#">#Order_ID#</a>
								</cfif> --->
								#Claim_ID#								
							</td>
							<td>#Organization#</td>
							<td>#Site#</td>
							<cfif IsUserInRole("Super User")>
								<td>#Region_ID#</td>
							</cfif>
							<td>#Cohort#</td>
							<td>#Scholarship_Type#</td>
							<td>
								<cfif IsDate(Claim_Date)>#DateFormat(Claim_Date, "m/d/yyyy")#</cfif>
							</td>
							<td>
								<cfif IsDate(Claim_Date)>
									#First_Name# #Last_Name#
								<cfelse>
									#Student_First_Name# #Student_Last_Name#
								</cfif>
							</td>
							<td>
								<cfset scheduledPayments = 0>
								<cfset payments = 0>
								<cfoutput>
									<cfset scheduledPayments = scheduledPayments + 1>
									<cfif IsNumeric(Payment_ID)>
										<cfset payments = payments + 1>
									</cfif>
								</cfoutput>
								#payments#/#scheduledPayments#
							</td>
						</tr>
						<cfset recs = recs + 1 />
					</cfoutput>
				</tbody>
			</table>
			
			<script type="text/javascript">
				$(function() {
					$("#scholarshipsList").kendoGrid({
						sortable: {
							mode: "single",
							allowUnsort: false
						}			
					})
					<cfoutput>
						$("##recs").text("#recs#");
					</cfoutput>
					$("#scholarshipsList").show();
				})
			</script>
			
		<cfelse>
		
			<div class="alert alert-info notFound">No orders</div>
	
			<script type="text/javascript" language="javascript">
			<!--
				$(function() {
					$("#filter").show();
				});
			// -->
			</script>
			
		</cfif>

	</cfform>


<!--- <cfoutput>

	<cfform name="scholarshipsForm" id="scholarshipsForm" action="#script_name#" method="post">
		<cfinput type="hidden" name="view" value="#view#">

		<div class="buttonBar">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td>
						<a href="" onclick="emailSelected(); return false;" class="formLink">E-mail selected</a>
						<a href="/applications/admin/methods/export.cfm?view=#view#" target="_blank" class="formLink">Export</a>
					</td>
					<td align="right">
						<strong>Count:</strong> #scholarships.RecordCount#
					</td>
				</tr>
			</table>
		</div>

		<!--- filter --->
		<script type="text/javascript" language="javascript">
		<!--
			toggleVisibility = function(objId) {
				var obj = document.getElementById(objId);
				if (obj.style.visibility == "visible") {
					obj.style.visibility = "hidden";
					obj.style.display = "none";
				} else {
					obj.style.visibility = "visible";
					obj.style.display = "block";
				}
			}

			updateFilterLink = function() {
				if (document.getElementById("filterSelections").style.visibility == "visible") {
					document.getElementById("filterLink").innerHTML = '#minusImage#&nbsp;Hide Filter';
				} else {
					document.getElementById("filterLink").innerHTML = '#plusImage#&nbsp;Show Filter';
				}
			}

			updateIDsSelect = function(selectObj) {
				if (selectObj.selectedIndex == 0) {
					selectObj.selectedIndex = 0;
				}
			}
		// -->
		</script>

		<cfset scholarshipTypes = application.scholarshipGateway.getScholarshipTypes()>

		<table class="filter" width="100%">
			<tr>
				<td class="filterHeader"><a id="filterLink"href="" onclick="toggleVisibility('filterSelections'); toggleVisibility('filterButtons'); updateFilterLink(); return false;" style="width: 100px; display: inline-block;">#plusImage#&nbsp;Show Filter</a><cfif filterTypes neq "All" or filterCohorts neq "All" or filterAB540 neq "All" or filterPaymentStatuses neq "All" or filterAuthorized neq "All" or Len(Trim(filterSearchCriteria)) gt 0>List is filtered</cfif></td>
			</tr>
			<tr id="filterSelections" style="visibility: hidden; display: none;">
				<td>

					<table>
						<tr>
							<td>
								<fieldset>
									<legend>Cohort</legend>
									<input type="radio" id="cohort1" name="filterCohorts" value="All"<cfif filterCohorts eq "All"> checked="true"</cfif>><label for="cohort1">&nbsp;All</label><br>
									<input type="radio" id="cohort2" name="filterCohorts" value="1"<cfif filterCohorts eq "1"> checked="true"</cfif>><label for="cohort2">&nbsp;1</label><br>
									<input type="radio" id="cohort3" name="filterCohorts" value="2"<cfif filterCohorts eq "2"> checked="true"</cfif>><label for="cohort3">&nbsp;2</label><br>
									<input type="radio" id="cohort4" name="filterCohorts" value="3"<cfif filterCohorts eq "3"> checked="true"</cfif>><label for="cohort4">&nbsp;3</label><br />
									<input type="radio" id="cohort5" name="filterCohorts" value="4"<cfif filterCohorts eq "4"> checked="true"</cfif>><label for="cohort5">&nbsp;4</label>
								</fieldset>
							</td>
							<td>
								<fieldset>
									<legend>Scholarship Types</legend>
									<cfselect name="filterTypes" size="7" multiple="true" required="yes" message="Scholarship Types is required" onChange="updateIDsSelect(this);">
										<option value="All"<cfif filterTypes eq "All"> selected</cfif>>All</option>
										<cfloop query="scholarshipTypes">
											<option value="#Scholarship_Type#"<cfif ListFind(filterTypes, Scholarship_Type)> selected</cfif>>#Scholarship_Type#</option>
										</cfloop>
									</cfselect>
									<div class="footnote">Ctrl to multi-select</div>
								</fieldset>
							</td>
							<td>
								<fieldset>
									<legend>Payment Statuses</legend>
									<cfselect name="filterPaymentStatuses" size="6" multiple="true" required="yes" message="Payment Statuses is required" onChange="updateIDsSelect(this);">
										<option value="All"<cfif filterPaymentStatuses eq "All"> selected</cfif>>All</option>
										<option value="Unclaimed"<cfif ListFind(filterPaymentStatuses, "Unclaimed")> selected</cfif>>Unclaimed</option>
										<!--- <option value="No Class Schedule Received"<cfif ListFind(filterPaymentStatuses, "No Class Schedule Received")> selected</cfif>>No Class Schedule Received</option> --->
										<option value="Verification Pending"<cfif ListFind(filterPaymentStatuses, "Verification Pending")> selected</cfif>>Verification Pending</option>
										<option value="Approved - Payment Pending"<cfif ListFind(filterPaymentStatuses, "Approved - Payment Pending")> selected</cfif>>Approved - Payment Pending</option>
										<option value="Paid Up-To-Date"<cfif ListFind(filterPaymentStatuses, "Paid Up-To-Date")> selected</cfif>>Paid Up-To-Date</option>
										<option value="Paid In-Full"<cfif ListFind(filterPaymentStatuses, "Paid In-Full")> selected</cfif>>Paid In-Full</option>
										<!--- <option value="Other"<cfif ListFind(filterPaymentStatuses, "Other")> selected</cfif>>Other</option> --->
									</cfselect>
									<!--- <cfselect name="filterPaymentStatuses" size="7" multiple="true" required="yes" message="Payment Statuses is required" onChange="updateIDsSelect(this);">
										<option value="All"<cfif filterPaymentStatuses eq "All"> selected</cfif>>All</option>
										<option value="Unclaimed"<cfif ListFind(filterPaymentStatuses, "Unclaimed")> selected</cfif>>Unclaimed</option>
										<option value="Uninitiated"<cfif ListFind(filterPaymentStatuses, "Uninitiated")> selected</cfif>>Uninitiated</option>
										<option value="Payment pending"<cfif ListFind(filterPaymentStatuses, "Payment pending")> selected</cfif>>Payment pending</option>
										<option value="Past deadline"<cfif ListFind(filterPaymentStatuses, "Past deadline")> selected</cfif>>Past deadline</option>
										<option value="On-schedule"<cfif ListFind(filterPaymentStatuses, "On-schedule")> selected</cfif>>On-schedule</option>
										<option value="Completed"<cfif ListFind(filterPaymentStatuses, "Completed")> selected</cfif>>Completed</option>
										<!--- <option value="Other"<cfif ListFind(filterPaymentStatuses, "Other")> selected</cfif>>Other</option> --->
									</cfselect> --->
									<div class="footnote">Ctrl to multi-select</div>
								</fieldset>
							</td>
							<td>
								<fieldset>
									<legend>CAFC Auth</legend>
									<input type="radio" id="authorized1" name="filterAuthorized" value="All"<cfif filterAuthorized eq "All"> checked="true"</cfif>><label for="authorized1">&nbsp;All</label><br>
									<input type="radio" id="authorized2" name="filterAuthorized" value="Yes"<cfif filterAuthorized eq "Yes"> checked="true"</cfif>><label for="authorized2">&nbsp;Yes</label><br>
									<input type="radio" id="authorized3" name="filterAuthorized" value="No"<cfif filterAuthorized eq "No"> checked="true"</cfif>><label for="authorized3">&nbsp;No</label>
								</fieldset>
							</td>
							<td>
								<fieldset>
									<legend>AB540</legend>
									<input type="radio" id="ab5401" name="filterAB540" value="All"<cfif filterAB540 eq "All"> checked="true"</cfif>><label for="ab5401">&nbsp;All</label><br>
									<input type="radio" id="ab5402" name="filterAB540" value="Yes"<cfif filterAB540 eq "Yes"> checked="true"</cfif>><label for="ab5402">&nbsp;Yes</label><br>
									<input type="radio" id="ab5403" name="filterAB540" value="No"<cfif filterAB540 eq "No"> checked="true"</cfif>><label for="ab5403">&nbsp;No</label>
								</fieldset>
							</td>
							<td>
								<fieldset>
									<legend>Keywords</legend>
									<cfinput type="text" name="filterSearchCriteria" value="#filterSearchCriteria#" size="20">
									<!--- <div class="footnote">Claim ID, Research ID, Name</div> --->
								</fieldset>
							</td>
							<td width="100%"></td>
						</tr>
					</table>

				</td>
			</tr>
			<tr id="filterButtons" style="visibility: hidden; display: none;">
				<td>
					<div style="margin-bottom: 4px;">
						<cfinput type="submit" name="applyFilterButton" id="applyFilterButton" value="Apply Filter" class="formButton2">
						<cfif filterTypes neq "All" or filterCohorts neq "All" or filterAB540 neq "All" or filterPaymentStatuses neq "All" or filterAuthorized neq "All" or Len(Trim(filterSearchCriteria)) gt 0>
							<a href="#script_name#?view=#view#&filterTypes=All&filterCohorts=All&filterAB540=All&filterPaymentStatuses=All&filterAuthorized=All&filterSearchCriteria=" class="formLink2">Clear filter</a>
						</cfif>
					</div>
				</td>
			</tr>
		</table>

		<cfif scholarships.RecordCount gt 0>

			<!--- checkbox functions --->
			<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
				<script type="text/javascript" language="javascript">
				<!--
					toggleSelectAll = function(f) {
						var c = f.selectAllCheckbox;
						for (var i=0; i<f.scholarshipIDs.length; i++) {
							if (c.checked) {
								f.scholarshipIDs[i].checked = true;
							} else {
								f.scholarshipIDs[i].checked = false;
							}
						}
					}

					updateSelectAll = function(chk) {
						if (!chk) {
							document.getElementById("selectAllCheckbox").checked = false;
						}
					}

					emailSelected = function() {
						var f = document.getElementById("scholarshipsForm");
						var scholarshipIDs = new Array();
						for (var i=0; i<f.scholarshipIDs.length; i++) {
							if (f.scholarshipIDs[i].checked) {
								scholarshipIDs[scholarshipIDs.length] = f.scholarshipIDs[i].value;
							}
						}
						if (scholarshipIDs.length == 0) {
							alert("Select at least one scholarship");
						} else {
							eSF = document.getElementById("emailSelectedForm");
							eSF.scholarshipIDs.value = scholarshipIDs;
							eSF.submit();
						}
					}
				// -->
				</script>
			</cfif>

			<table class="list" width="100%">
				<tr>
					<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
						<th><input name="selectAllCheckbox" id="selectAllCheckbox" type="checkbox" onclick="toggleSelectAll(this.form);"></th>
					</cfif>
					<th><a href="#script_name#?view=#view#&orderBy=Scholarship_ID<cfif orderBy eq 'Scholarship_ID' and orderDir eq 'asc'>&orderDir=desc</cfif>">ID<cfif orderBy eq "Scholarship_ID">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Claim_ID<cfif orderBy eq 'Claim_ID' and orderDir eq 'asc'>&orderDir=desc</cfif>">Claim ID<cfif orderBy eq "Claim_ID">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Claim_Date<cfif orderBy eq 'Claim_Date' and orderDir eq 'asc'>&orderDir=desc</cfif>">Claim Date<cfif orderBy eq "Claim_Date">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Enrollment_Date<cfif orderBy eq 'Enrollment_Date' and orderDir eq 'asc'>&orderDir=desc</cfif>">Enrollment Date<cfif orderBy eq "Enrollment_Date">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Cohort<cfif orderBy eq 'Cohort' and orderDir eq 'asc'>&orderDir=desc</cfif>">Cohort<cfif orderBy eq "Cohort">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Scholarship_Type<cfif orderBy eq 'Scholarship_Type' and orderDir eq 'asc'>&orderDir=desc</cfif>">Scholarship Type<cfif orderBy eq "Scholarship_Type">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Last_Name<cfif orderBy eq 'Last_Name' and orderDir eq 'asc'>&orderDir=desc</cfif>">Name<cfif orderBy eq "Last_Name">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=Institution1<cfif orderBy eq 'Institution1' and orderDir eq 'asc'>&orderDir=desc</cfif>">Institution<cfif orderBy eq "Institution1">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=institution1TermType<cfif orderBy eq 'institution1TermType' and orderDir eq 'asc'>&orderDir=desc</cfif>">Term Type<cfif orderBy eq "institution1TermType">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=banking<cfif orderBy eq 'banking' and orderDir eq 'asc'>&orderDir=desc</cfif>">Banking<cfif orderBy eq "banking">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
					<th><a href="#script_name#?view=#view#&orderBy=paymentStatus<cfif orderBy eq 'paymentStatus' and orderDir eq 'asc'>&orderDir=desc</cfif>">Payment Status<cfif orderBy eq "paymentStatus">&nbsp;&nbsp;<cfif orderDir eq "asc">#ascImage#<cfelse>#descImage#</cfif></cfif></a></th>
				</tr>
				<cfloop query="scholarships">
					<tr<cfif currentRow mod 2 eq 0> class="evenRow"<cfelse> class="oddRow"</cfif>>
						<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
							<td><input type="checkbox" name="scholarshipIDs" value="#Scholarship_ID#" onclick="updateSelectAll(this.checked);"<cfif ListFind(scholarshipIDs, Scholarship_ID)> checked</cfif>></td>
						</cfif>
						<td>#Scholarship_ID#</td>
						<td><a href="#script_name#?view=editScholarship&rv=#view#&scholarshipID=#Scholarship_ID#">#Claim_ID#</a></td>
						<td>#DateFormat(Claim_Date, "m/d/yyyy")#</td>
						<td>#DateFormat(Enrollment_Date, "m/d/yyyy")#</td>
						<td>#Cohort#</td>
						<td>#Scholarship_Type#</td>
						<td>#First_Name# #Last_Name#</td>
						<td>
							<cfif IsDate(Claim_Date) and Institution1_ID gt 0>
								<cfif institution1Approved eq 0 and institution1Disqualified eq 0>
									<font color="orange">#institution1#</font>
								<cfelseif institution1Approved eq 1 and institution1Disqualified eq 0>
									#institution1#
								<cfelseif institution1Approved eq 0 and institution1Disqualified eq 1>
									<font color="red">#institution1#</font>
								<cfelse>
									Error determining institution status
								</cfif><cfif Len(Trim(institution2)) gt 0 or Len(Trim(institution3)) gt 0>&nbsp;<span class="highlightText">multi-institution</span></cfif>
							</cfif>
						</td>
						<td>#institution1TermType#</td>
						<td>
							<cfif IsNumeric(Scholarship_Type)>
								<cfif Account_Type eq "Check">
									Check
								<cfelse>
									<cfif Len(Trim(Routing_Number)) gt 0 and Len(Trim(Account_Number)) gt 0>
										Entered
									<cfelse>
										Not entered
									</cfif>
								</cfif>
							<cfelse>
								N/A
							</cfif>
						</td>
						<td>#paymentStatus#</td>
					</tr>
				</cfloop>
			</table>
		</cfif>
	</cfform>

	<cfif scholarships.RecordCount eq 0>

		<div class="alert alert-info notFound">No scholarships with the selected filter criteria</div>

		<!--- show filter --->
		<script type="text/javascript" language="javascript">
		<!--
			toggleVisibility('filterSelections');
			toggleVisibility('filterButtons');
			updateFilterLink();
		// -->
		</script>

	</cfif>

</cfoutput> --->